package com.lagou.edu.service;

import com.lagou.edu.config.FeignLog;
import com.lagou.edu.service.impl.EmailServiceFailBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author stevejson
 */
@FeignClient(value = "lagou-service-email", configuration = FeignLog.class, fallback = EmailServiceFailBack.class,path = "/email")
public interface IEmailServiceFeignClient {
    /**
     * 发送邮件的服务接口
     * @param email 邮箱
     * @param code code
     * @return 结果
     */
    @RequestMapping(value = "/{email}/{code}", method = RequestMethod.POST)
    public Boolean sendEmail(@PathVariable String email, @PathVariable String code);
}
